﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Top.Api.Response;

namespace TbShop.Entity.Bussinessentity
{


    public class TBKGoodsListModel
    {
        public List<TBKGoodsDetailModel> Results { get; set; }

        public long TotalResults { get; set; }
    }

    public class TBKGoodsDetailModel : TbkDgItemCouponGetResponse.TbkCouponDomain
    {
        public decimal TbkCouponPrice { set; get; }

        /// <summary>
        /// 分享赚
        /// </summary>
        public decimal SharePrice { set; get; }

        /// <summary>
        /// 淘口令
        /// </summary>
        public string Password { set; get; }

        /// <summary>
        /// 券后价
        /// </summary>
        public decimal ResultPrice
        {
            set;
            get;
        }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime CreatedDate { set; get; }

        public string SmallImageStr { set; get; }

        public decimal RewardPrice { set; get; }
    }

    public class TBKMaterialGoodsListModel
    {
        public List<TBKGoodsDetailMaterialModel> Results { get; set; }

        public long TotalResults { get; set; }
    }

    public class TBKGoodsDetailMaterialModel : TbkDgMaterialOptionalResponse.MapDataDomain
    {
        public decimal TbkCouponPrice { set; get; }

        /// <summary>
        /// 分享赚
        /// </summary>
        public decimal SharePrice { set; get; }

        /// <summary>
        /// 淘口令
        /// </summary>
        public string Password { set; get; }

        /// <summary>
        /// 券后价
        /// </summary>
        public decimal ResultPrice
        {
            get
            {
                decimal finalPrice = 0;
                decimal.TryParse(ZkFinalPrice, out finalPrice);
                if (finalPrice > 0)
                {
                    return finalPrice - this.TbkCouponPrice;
                }
                return 0;
            }
        }
    }
}
